<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>正则操作DOM元素</title>
</head>
<body>
    <h1>Jimmy.com</h1>
    <h3>Welcome</h3>
    <p>my home</p>
</body>
<script>
    // 实现删除DOM元素
    /*
        + 表示1个或多个
        * 表示0个或多个
    */
    const body = document.body
    const reg = /<h[1-6]>[\s\S]*<\/h[1-6]>/ig
    body.innerHTML = body.innerHTML.replace(reg,'')
</script>
</html>